home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / IIGS / TN.IIGS.099 < prev    next >
Encoding:
Text File  |  1991-06-28  |  4.2 KB  |  99 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. Apple IIgs
  8. #99:         Supplemental Scrap Types
  9.  
  10. Revised by:  Matt Deatherage                                       March 1991
  11. Written by:  Matt Deatherage & Matthew Reimer                    January 1991
  12.  
  13. This Technical Note describes public scrap types.
  14.  
  15. Changes since January 1991:  Added the TextEdit Style Scrap type.
  16. _____________________________________________________________________________
  17.  
  18.  
  19. The Apple IIgs Toolbox Reference lists only two known scrap types text 
  20. ($0000) and pictures ($0001).  Other assigned scrap types are documented in 
  21. this Note.  The format used to describe the scraps is similar to that used in 
  22. File Type Notes, where the offsets, given in the form (+xxx), determine the 
  23. offset from the beginning of the scrap handle.
  24.  
  25.  
  26. Sampled Sound Scrap (Type: $0002)
  27.  
  28. The following describes the Sampled Sound scrap format.  It consists of a
  29. ten-byte header followed by the sample data bytes.  This format is identical 
  30. to the sampled sound resource format.
  31.  
  32. Format      (+000)  Word    This must always be zero.
  33. Wave Size   (+002)  Word    Sample size in pages (256 bytes per page).  For
  34.                             example, an 8K sample takes 32 pages; a 128K 
  35.                             sample requires $200 pages.
  36. Rel Pitch   (+004)  Word    The high byte of this word is a semitone value; 
  37.                             the low byte is a fractional semitone.  These 
  38.                             values are used to tune the sample to correct 
  39.                             pitch.
  40. Stereo      (+006)  Word    The output channel for this sound is in the low
  41.                             nibble of this word.
  42. Sample rate (+008)  Word    The sampling rate of the sound, in Hertz (Hz).
  43. Sound       (+010)  Bytes   The sampled sound data.  The bytes are all 8-bit
  44.                             samples.  The sample starts here and continues
  45.                             until the end of the scrap.
  46.  
  47.  
  48. TextEdit Style Scrap (Type:  $0064)
  49.  
  50. The TextEdit Style Scrap format is the same as the TEFormat structure defined
  51. in Volume 3 of the Apple IIgs Toolbox Reference, which is also the same as 
  52. the rStyleBlock resource format defined in the same volume.
  53.  
  54. Icon Scrap (Type: $4945)
  55.  
  56. The Icon scrap format is the same as the format for Finder Icon Data records,
  57. documented in detail in the File Type Note for File Type $CA, Finder Icon
  58. Files.  If there is more than one Icon Data record in a scrap, they are
  59. concatenated together with no intervening space.
  60.  
  61.  
  62. Mask Scrap (Type: $8001)
  63.  
  64. The Mask scrap format is exactly the same as the PICT scrap ($0001) format,
  65. except that the pixel image the picture draws contains only zeroes and ones.
  66. When drawn, this picture creates a mask.  The mask has zeroes where the image
  67. can be seen through the mask, and ones where the mask does not allow the
  68. picture through.  When pasting a Mask scrap, initialize the destination 
  69. bitmap to zero and draw the picture.
  70.  
  71. You can create the mask image by using regular QuickDraw II calls (using 
  72. ovals, rectangles, etc.) or you can create it independently and include it 
  73. with PaintPixels or other pixel map manipulation routines.
  74.  
  75.  
  76. Color Table Scrap (Type: $8002)
  77.  
  78. The following describes the Color Table scrap format.  The scrap contains 
  79. color tables so that applications can keep custom colors with pictures copied 
  80. to the clipboard.  The scrap has the same format as the Apple Preferred 
  81. Format picture PALETTES block:
  82.  
  83. NumColorTables  (+000)  Word        The count of the number of color tables
  84.                                     in the scrap
  85. ColorTableArray (+002)  32 Bytes    The color tables for the scrap.  There 
  86.                                     are NumColorTables of them, each 32 bytes 
  87.                                     long.
  88.  
  89.  
  90. Further Reference
  91. _____________________________________________________________________________
  92.   o  Apple IIgs Toolbox Reference
  93.   o  HyperCard IIgs Technical Note #3, Tuning Sampled Sounds
  94.   o  File Type Note for file type $CA, all auxiliary types, Finder Icons File
  95.   o  File Type Note for file type $C0, auxiliary type $0002, Apple Preferred 
  96.      Format
  97.  
  98.  
  99.